<admintpl file="header"/>
<body class="J_scroll_fixed">
<div class="wrap jj">
  <ul class="nav nav-tabs">
     <li><a href="{:U('Product/index')}">产品列表</a></li>
     <li class="active"><a href="{:U('Product/edit',array('pid'=>$id))}"  target="_self">修改产品信息</a></li>
  </ul>
  <div class="common-form">
  <form action="{:u('Product/edit_post',array('pid'=>$pid))}" method="post" class="form-horizontal J_ajaxForm" >
    <div class="table_list">
      <table width="100%" cellpadding="4" cellspacing="2">
            <tr>
              <th width="80">品牌</th>
              <td><select name="brand" class="normal_select">{$brandlist}</select></td>
            </tr>
            <tr>
              <th>产品名称</th>
              <td>
              	<input type="text" style="width:300px;" name="product_name" id="pname"  required value="{$pname}" class="input input_hd J_title_color" placeholder="请输入产品名称" onkeyup="strlen_verify(this, 'title_len', 50)" />
              	<span class="must_red">*</span>
                <input type="hidden" name="pid" value="{$id}">
              </td>
            </tr>
            <tr>
              <th>报价</th>
              <td><input type="text" name='product_price' id='price' value="{$price}"  required placeholder='请填写报价' class="input input_hd J_title_color" /></td>
            </tr> 
             <tr>
              <th>浏览量</th>
              <td><input type="text" name='product_hits' id='hits' value="{$hits}"  required placeholder='请填写浏览量' class="input input_hd J_title_color" /></td>
            </tr>  
            <tr>
            	<th>缩略图</th>
                <td><div><input type='hidden' name='product_avatar' id='thumb' value="{$avatar|default=''}">
			<a href='javascript:void(0);' onclick="flashupload('thumb_images', '附件上传','thumb',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
			
			<if condition="empty($avatar)">
				<img src="__ROOT__/statics/images/icon/upload-pic.png" id='thumb_preview' width='135' height='113' style='cursor:hand' />
			<else/>
				<img src="{:sp_get_asset_upload_path($avatar)}" id='thumb_preview' width='135' height='113' style='cursor:hand' />
			</if>
			
			</a>
			<!-- <input type="button" class="btn" onclick="crop_cut_thumb($('#thumb').val());return false;" value="裁减图片">  -->
            <input type="button"  class="btn" onclick="$('#thumb_preview').attr('src','__ROOT__/statics/images/icon/upload-pic.png');$('#thumb').val('');return false;" value="取消图片">
            </div> 
                </td>
            </tr>    
            <tr>
            	<th>启用</th>
                <td>
                <span class="switch_list cc">
          	<php>
          		$status_yes=$status==1?"checked":"";
          		$status_no=$status==0?"checked":"";
          	</php>
			<label><input type="radio" name="product_status" value="1" {$status_yes}><span>审核通过</span></label>
			<label><input type="radio" name="product_status" value="0" {$status_no}><span>待审核</span></label>
		 	</span>
                </td>
            </tr>                  
        </tbody>
      </table>
    </div>
  <div class="form-actions">
        <button type="submit" class="btn btn-primary btn_submit  J_ajax_submit_btn">提交</button>
        <a class="btn" href="{:U('Product/index')}">返回</a>
  </div>
 </form>
</div>
<script type="text/javascript" src="__ROOT__/statics/js/common.js"></script>
<script type="text/javascript" src="__ROOT__/statics/js/content_addtop.js"></script>
</body>
</html>